package com.javaGame.role.enemy;

import com.javaGame.role.BaseRole;
import com.javaGame.util.ImageChange;

import java.awt.*;

/**
 * 灯怪
 */
public class Light extends EnemyRole {
    /**灯怪图片数组*/
    public static Image[] lightImg;
    /**图片切换对象*/
    private ImageChange imageChange = new ImageChange(2);
    public Light() {
        super((int)(Math.random()*600),
                (int)(700+Math.random()*100),
                150, 150,80,200);
    }

    @Override
    public void move() {
        this.y -= 10;
        this.currentImg = imageChange.change(lightImg);
    }
}
